27. Applying Metrics to Your POI Identifier
Applying Metrics to Your POI Identifier
Go back to your code from the last lesson, where you built a simple first iteration of a POI identifier using a decision tree and one feature. Copy the POI identifier that you built into the skeleton code in evaluation/evaluate_poi_identifier.py . Recall that at the end of that project, your identifier had an accuracy (on the test set) of 0.724. Not too bad, right? Let’s dig into your predictions a little more carefully.
INSTRUCTOR NOTE:
From Python 3.3 forward, a change to the order in which dictionary keys are processed was made such that the orders are randomized each time the code is run. This will cause some compatibility problems with the graders and project code, which were run under Python 2.7. To correct for this, add the following argument to the
featureFormat
call on line 25 of
evaluate_poi_identifier.py
:
sort_keys = '../tools/python2_lesson14_keys.pkl'
This will open up a file in the
tools
folder with the Python 2 key order.